package me.caofeng.pojo;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * Copyright © 2017曹峰. All rights reserved.
 *
 * @Prject: mall
 * @Package: me.caofeng.pojo
 * @Description:
 * @Author: 曹峰 blog.caofeng.me
 * @Date: 2017-06-17 15:10
 * @Version: V1.0
 */
public class SecurityQuestion extends Pojo{

    private String userId;

    @NotNull
    @Size(min = 3,message = "问题长度要大于3")
    private String question;

    @NotNull
    @Size(min = 3,message = "答案长度要大于3")
    private String answer;

    public SecurityQuestion() {

    }

    public SecurityQuestion(int id, Date createTime, Date updateTime, int isDelete, String userId, String question, String answer) {
        super(id, createTime, updateTime, isDelete);
        this.userId = userId;
        this.question = question;
        this.answer = answer;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    @Override
    public String toString() {
        return "SecurityQuestion{" +
                "userId='" + userId + '\'' +
                ", question='" + question + '\'' +
                ", id=" + id +
                ", createTime=" + createTime +
                ", answer='" + answer + '\'' +
                ", updateTime=" + updateTime +
                ", isDelete=" + isDelete +
                '}';
    }
}
